<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>地址显示页面</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/css.css" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>

<link rel="stylesheet"
	href="<%=basePath%>res/tl/js/layui/css/layui.css" media="all">
<base src="<%=basePath%>">
<style type="text/css">
body {
	margin: 20px 0px;
}
.open_new{
	text-align:left;
	margin:20px 0px;
}
</style>
<script type="text/javascript">
$(function() {
	$('.Caddress .add_mi').click(function() {
		$(this).css('background', 'url("images/mail_1.jpg") no-repeat').siblings('.add_mi').css('background', 'url("images/mail.jpg") no-repeat')
	})
	var url = "<%=basePath%>shArea/findByuserId";
	var data = null;
	$.post(url,data,function(mes){
		for(var i=0;i<mes.length;i++){
			$("#uu").append("<div class='add_mi' onclick='checked(this);'>"
					+"<p style='border-bottom: 1px dashed #ccc; line-height: 28px;'>"+mes[i].addressContent+"("+mes[i].userName+"收)</p>"
					+"<p>"+mes[i].addressDetails+" 13735683918</p>"
					+"</div>");
		}
	});
}); 
function checked(obj){
	$(obj).css('background', 'url("images/mail_1.jpg") no-repeat').siblings('.add_mi').css('background', 'url("images/mail.jpg") no-repeat')
}
</script>
<script>

</script>
</head>
<body>



	<div class="Caddress">
		<div class="open_new">
			<button class="layui-btn" id="fodMerchantAdd" data-type="add">添加地址</button>
		</div>
		<div id="uu">
			
		
		</div>
		<!--  <div class="add_mi" >
			<p style="border-bottom: 1px dashed #ccc; line-height: 28px;"></p>
			<p>萧山 北干 明怡花苑53幢3单元 13735683918</p>
		</div>
		-->
	</div>
	
	<table class="layui-hide" id="fodMerchant" lay-filter="demo"></table>

	<script src="<%=basePath%>res/tl/js/layui/layui.js"></script>
	<script>

layui.use(['laydate', 'laypage', 'layer', 'table', 'upload', 'element'], function(){
	  var laydate = layui.laydate //日期
	  ,laypage = layui.laypage //分页
	  layer = layui.layer //弹层
	  ,table = layui.table //表格
	  ,upload = layui.upload //上传
	  ,element = layui.element //元素操作
	  ,$=layui.$;
	 
	$('#fodMerchantAdd').on('click', function(){
		 layer.open({
			  type: 	2,
			  area : ['80%' , '85%'],//弹出框大小
			  shift:1,//弹出框动画效果
			  content: ['showAdd.jsp','on'] //这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
			}); 
	   }); 
	  
});
	  
	  
</script>
</body>
</html>